﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CodeGenerator.UI
{
    public partial class UcSelectTableStruct : UserControl
    {
        public UcSelectTableStruct()
        {
            InitializeComponent();
        }

        public List<string> GetSelectStruct
        {
            get
            {
                var selectStruct = new List<string>();
                for (int i = 0; i < checkedListBox1.Items.Count; i++)
                {
                    if (checkedListBox1.GetItemChecked(i))
                    {
                        selectStruct.Add(checkedListBox1.GetItemText(checkedListBox1.Items[i]));
                    }
                }
                return selectStruct;
            }
        }

        private void UcSelectTableStruct_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
                checkedListBox1.SetItemChecked(i, true);
        }
    }
}
